package com.example.problem1.api.impl;

import com.example.problem1.entity.Demo;
import org.springframework.beans.factory.FactoryBean;

public class DemoFactoryBean implements FactoryBean {
    @Override
    public Object getObject() throws Exception {
        Demo demo = new Demo();
        demo.setId(5L);
        demo.setName("FactoryBean装配");
        return demo;
    }

    @Override
    public Class<?> getObjectType() {
        return Demo.class;
    }
}
